package com.sinodata.bsm.common.vo;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;

/**
 * EventRule entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "EVENT_RULE")
public class EventRule implements java.io.Serializable {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 1803552240555235081L;

    // Fields    
    private Long id;
    private Long resId;
    private Long eventTypeId;
    private Integer level;
    private String expr;
    private Integer duration;
    private String msg;
    private String remarks;
    private String vailTime;
    private Integer exprIsDefault;//EXPR_IS_DEFAULT
    private Integer msgIsDefault;//MSG_IS_DEFAULT
    private Integer filterDuration;//FILTER_DURATION
    private Integer confirmDuration;//CONFIRM_DURATION
    private String keyWord;//KEY_WORD
    private Integer status;//STATUS
    private String objectExpr;//OBJECT_EXPR

    // Constructors

    /** default constructor */
    public EventRule() {

    }

    @Column(name = "STATUS", precision = 1, scale = 0)
    public Integer getStatus() {
        return status;
    }

    public void setStatus(Integer status) {
        this.status = status;
    }

    /** minimal constructor */
    public EventRule(Long id) {
        this.id = id;
    }

    /** full constructor */
    public EventRule(Long id, Long resId, Long eventTypeId, Integer level, String expr, Integer duration, String msg, String remarks, String vailTime, Integer exprIsDefault, Integer msgIsDefault, Integer filterDuration, Integer confirmDuration, String keyWord, Integer status, String objectExpr) {
        this.id = id;
        this.resId = resId;
        this.eventTypeId = eventTypeId;
        this.level = level;
        this.expr = expr;
        this.duration = duration;
        this.msg = msg;
        this.remarks = remarks;
        this.vailTime = vailTime;
        this.exprIsDefault = exprIsDefault;
        this.msgIsDefault = msgIsDefault;
        this.filterDuration = filterDuration;
        this.confirmDuration = confirmDuration;
        this.keyWord = keyWord;
        this.status = status;
        this.objectExpr = objectExpr;
    }

    // Property accessors
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "sequence")
    @SequenceGenerator(name = "sequence", sequenceName = "EVENT_RULE_SEQ")
    @Column(name = "ID", unique = true, nullable = false, precision = 18, scale = 0)
    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    @Column(name = "RES_ID", precision = 18, scale = 0)
    public Long getResId() {
        return this.resId;
    }

    public void setResId(Long resId) {
        this.resId = resId;
    }

    @Column(name = "EVENT_TYPE_ID", precision = 18, scale = 0)
    public Long getEventTypeId() {
        return this.eventTypeId;
    }

    public void setEventTypeId(Long eventTypeId) {
        this.eventTypeId = eventTypeId;
    }

    @Column(name = "LEVEL_", precision = 1, scale = 0)
    public Integer getLevel() {
        return this.level;
    }

    public void setLevel(Integer level) {
        this.level = level;
    }

    @Column(name = "EXPR", length = 512)
    public String getExpr() {
        return this.expr;
    }

    public void setExpr(String expr) {
        this.expr = expr;
    }

    @Column(name = "DURATION", precision = 9, scale = 0)
    public Integer getDuration() {
        return this.duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    @Column(name = "MSG", length = 1024)
    public String getMsg() {
        return this.msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    @Column(name = "REMARKS", length = 1024)
    public String getRemarks() {
        return this.remarks;
    }

    public void setRemarks(String remarks) {
        this.remarks = remarks;
    }

    @Column(name = "VAIL_TIME", length = 256)
    public String getVailTime() {
        return this.vailTime;
    }

    public void setVailTime(String vailTime) {
        this.vailTime = vailTime;
    }

    @Column(name = "EXPR_IS_DEFAULT", precision = 1, scale = 0)
    public Integer getExprIsDefault() {
        return exprIsDefault;
    }

    public void setExprIsDefault(Integer exprIsDefault) {
        this.exprIsDefault = exprIsDefault;
    }

    @Column(name = "MSG_IS_DEFAULT", precision = 1, scale = 0)
    public Integer getMsgIsDefault() {
        return msgIsDefault;
    }

    public void setMsgIsDefault(Integer msgIsDefault) {
        this.msgIsDefault = msgIsDefault;
    }

    @Column(name = "FILTER_DURATION", precision = 9, scale = 0)
    public Integer getFilterDuration() {
        return filterDuration;
    }

    public void setFilterDuration(Integer filterDuration) {
        this.filterDuration = filterDuration;
    }

    @Column(name = "CONFIRM_DURATION", precision = 9, scale = 0)
    public Integer getConfirmDuration() {
        return confirmDuration;
    }

    public void setConfirmDuration(Integer confirmDuration) {
        this.confirmDuration = confirmDuration;
    }

    @Column(name = "KEY_WORD", length = 1024)
    public String getKeyWord() {
        return keyWord;
    }

    public void setKeyWord(String keyWord) {
        this.keyWord = keyWord;
    }

    @Column(name = "OBJECT_EXPR", length = 512)
    public String getObjectExpr() {
        return objectExpr;
    }

    public void setObjectExpr(String objectExpr) {
        this.objectExpr = objectExpr;
    }

    @Override
    public String toString() {
        return "EventRule [id=" + id + ", resId=" + resId + ", eventTypeId=" + eventTypeId + ", level=" + level + ", expr=" + expr + ", duration=" + duration + ", msg=" + msg + ", remarks=" + remarks + ", vailTime=" + vailTime + "exprIsDefault=" + exprIsDefault + "msgIsDefault=" + msgIsDefault + "filterDuration=" + filterDuration + "confirmDuration" + confirmDuration + "keyWord=" + keyWord + "status=" + status + "objectExpr=" + objectExpr + "]";
    }
}